home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / dinalpha.bst < prev    next >
Text File  |  1994-11-24  |  34KB  |  1,520 lines

  1. %%  DINALPHA.BST         ---  ß-Version v. 9/11/94 K.F.Lorenzen
  2. %%
  3. %%  entwickelt aus BibTeX standard bibliography style `alpha'
  4. %%  gemaess der deutschen Zitiernorm DIN 1505 Teil 2
  5. %%        von Klaus F. Lorenzen, Hamburg  5/2/94 bis 28/3/94 
  6. %%        Jobst-Hartmut Lueddecke, Hamburg  habe ich fuer Verbesserungsvor-
  7. %%        schlaege und stete Unterstuetzung bei der Implementierung
  8. %%        auf der DEC-Rechenanlage des RZ der FH Hamburg zu danken
  9. %%        Oren Patashnik, dem BIBTEX-Schoepfer zugeeignet
  10. %%  Dieser style produziert Literaturzitate in Literaturverzeichnissen
  11. %%  gemaess der deutschen Norm DIN 1505, Teil 2 vom Jan. 1984.
  12. %%  Es gibt eine Reihe prinzipieller Unterschiede zwischen der US- und 
  13. %%  der deutschen Zitierkonvention. Daher ist auch keine 1-1-deutige  
  14. %%  Abbildung der beiden Regelwerke aufeinander moeglich. 
  15. %%  Dennoch laesst sich in fast allen Faellen problemlos ein Original-bib-file
  16. %%  (d.i. die Datenbank, die die bibliographischen Informationen enthaelt)
  17. %%  wahlweise nach US-Norm oder deutscher DIN-Norm verarbeiten. 
  18. %%  [Beispiel: Produzieren Sie mit der XAMPL.bib-Datenbank aus dem Original-
  19. %%  paket 2 verschiedene Literaturverzeichnisse.]     Zu Gunsten
  20. %%  der Allgemeingueltigkeit von bib-files ist bei den Publikationstypen
  21. %%  (entry-types) und den bibliographischen Kategorien (fields) in Zweifels-
  22. %%  faellen immer (ja, mit endlichen Ausnahmen) die originale US-Bedeutung 
  23. %%  beibehalten worden. Bei der Erfassung von Literaturquellen in bib-files 
  24. %%  gelten folglich die in der TEX-Literatur veroeffentlichten Regeln.
  25. %%  Kommt es dennoch zu kleineren "Schoenheitsfehlern" im fertig gesetzten 
  26. %%  output, so koennen diese so gut wie immer durch eine leicht veraenderte 
  27. %%  Erfassung im bib-file beseitigt werden.
  28. %%
  29. %%  Die entry-Funktionen booklet und phdthesis entfallen zugunsten der
  30. %%  Funktionen book und mastersthesis.
  31. %%
  32. %%  Diese beta-Version ist an der FH Hamburg seit einem halben Jahr erfolgreich
  33. %%  im Test und wird nun einem groesseren Anwenderkreis uebergeben. Eine aus-
  34. %%  fuehrliche Dokumentation mit Beispielen ist in Vorbereitung. 
  35. %%  ACHTUNG!  Aus Testgruenden, Zeitmangel und Faulheit sind noch nicht
  36. %%  alle ueberfluessigen Fehlermeldungen des Original-style ausgemerzt.
  37. %%  Ferner sind noch laengst nicht alle Programmverfeinerungen ausgekostet.
  38. %%  Das fuehrt mitunter zu Wasserfallartigen Fehlermeldungen: vergessen Sie
  39. %%  es einfach und schauen Sie sich lieber das fertige Literaturverzeichnis
  40. %%  an!
  41. %%  Aus dinalpha.bst sind analog zur Originalversion die anderen styles
  42. %%  dinplain.bst, dinunsrt.bst, dinabbr.bst abgeleitet und einsatzbereit.
  43. %%
  44. %%  Kritik, Vorschlaege usw. bitte an 
  45. %%          FH Hamburg,  Klaus F. Lorenzen, Grindelhof 30, 20146 Hamburg
  46. %%          e-mail: lorenzen@rzbt.fh-hamburg.de
  47. %%
  48. % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09.
  49. % Copyright (C) 1985, all rights reserved.
  50. % Copying of this file is authorized only if either
  51. % (1) you make absolutely no changes to your copy, including name, or
  52. % (2) if you do make changes, you name it something other than
  53. % dinbst.doc, dinplain.bst, dinunsrt.bst, dinalpha.bst, and dinabbrv.bst.
  54. % This restriction helps ensure that all standard styles are identical.
  55. %% ==>  The file btxbst.doc has the original documentation for style 'alpha'.
  56. %%      The file dinbst.doc has the documentation for this style (`dinalpha').
  57. %%      dinbst.doc is not yet delivered (9/11/94), Lo
  58. %%
  59.  
  60. ENTRY
  61.   { address      %% 
  62.     author       %% 
  63.     booktitle    %%
  64.     chapter      %%
  65.     edition      %% 
  66.     editor       %% 
  67.     howpublished %%
  68.     institution  %%
  69.     isbn         %% neues Feld: Standardnr fuer Buecher
  70.     issn         %%  - " -    :      -"-        Zeitschriften u. Serien
  71.     journal      %% 
  72.     key          %%
  73.     month        %% 
  74.     note         %% 
  75.     number       %% 
  76.     organization %%
  77.     pages        %% 
  78.     publisher    %% 
  79.     school       %% 
  80.     series       %% 
  81.     title        %% 
  82.     type         %% 
  83.     volume       %% 
  84.     year         %% 
  85.   }
  86.   {}
  87.   { label extra.label sort.label }
  88.  
  89. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  90.  
  91. %%$$$ die folg. BOOLE'sche VAR steuern d. Ausg. ": " nach Urheber-Feldern
  92. %%    und ". - " vor ISBN oder Anmerkungen (NOTE)
  93.  
  94. INTEGERS { colon.after  period.dash }
  95.  
  96. FUNCTION {init.state.consts}
  97. { #0 'before.all :=
  98.   #1 'mid.sentence :=
  99.   #2 'after.sentence :=
  100.   #3 'after.block :=
  101.   #4 'colon.after :=
  102.   #5 'period.dash :=
  103. }
  104. INTEGERS { zahl  lang }  
  105.  
  106. STRINGS { h s t u v }    
  107.  
  108. %%$$$ neue DIN-Funktion, 16/2/94
  109.  
  110. FUNCTION {output.nonnull}
  111. { 's :=
  112.   output.state after.block =
  113.       { add.period$  write$
  114.     newline$
  115.     "\newblock " write$
  116.       }
  117.       { output.state before.all =
  118.       {  write$ }     
  119.       {  output.state colon.after =
  120.            { ": " * write$
  121.          newline$
  122.          "\newblock " write$
  123.            }
  124.            { output.state period.dash =
  125.            { ". -- " *  write$
  126.              newline$
  127.              "\newblock " write$
  128.            }
  129.            { output.state mid.sentence =
  130.                { ", " * write$ }
  131.                { " "  * write$ 
  132.              newline$
  133.              "\newblock " write$
  134.                }
  135.              if$
  136.            }
  137.         if$
  138.            }
  139.         if$
  140.        }     
  141.      if$
  142.      after.block 'output.state :=
  143.        }
  144.      if$
  145.      s 
  146. }
  147.  
  148. FUNCTION {output}
  149. { duplicate$ empty$
  150.     'pop$
  151.     'output.nonnull
  152.   if$
  153. }
  154.  
  155. FUNCTION {output.check}
  156. { 't :=
  157.   duplicate$ empty$
  158.     { pop$ "empty " t * " in " * cite$ * warning$ }
  159.     'output.nonnull
  160.   if$
  161. }
  162.  
  163. FUNCTION {output.bibitem}
  164. { newline$
  165.   "\bibitem[" write$
  166.   label write$
  167.   "]{" write$
  168.   cite$ write$
  169.   "}" write$
  170.   newline$
  171.   ""
  172.   before.all 'output.state :=
  173. }
  174.  
  175. FUNCTION {fin.entry}   %%$$$  nach DIN neu 16/2/94
  176. { write$
  177.   newline$
  178. }
  179.  
  180. FUNCTION {set.period.dash}    %% Wenn ein ". - " die Satzteile trennen soll.!
  181. { output.state before.all =
  182.     'skip$
  183.     { period.dash  'output.state := }
  184.   if$
  185. }
  186.  
  187. %%$$$ neu 16/2/94
  188. %%   prueft, ob ISBN- oder NOTE-Feld vh. ist und setzt dann ". - " davor.
  189. %%   wenn aber ein PAGES-Feld ausgegeben wurde, dann kommt nichts davor.
  190.  
  191. FUNCTION {set.period.dash.check}  
  192. { empty$                            
  193.     'skip$
  194.     'set.period.dash  
  195.   if$
  196. }
  197.  
  198. FUNCTION {set.colon.after}   %%$$$ Wenn ein ": " d. Satzteile trennen soll!
  199. { output.state before.all =
  200.     'skip$
  201.     { colon.after 'output.state  := }
  202.   if$
  203. }
  204.  
  205. %% neu / alt 17/2/94          Wenn ein " " die Satzteile trennen soll.!
  206. FUNCTION {new.sentence}
  207. { output.state before.all =
  208.      'skip$
  209.      { after.sentence 'output.state := }
  210.   if$
  211. }
  212.  
  213. %% neu 17/2/94                 Wenn ein ", " die Satzteile trennen soll.!
  214. FUNCTION { part.of.sentence }
  215. { output.state before.all =
  216.      'skip$
  217.      { mid.sentence 'output.state := }
  218.   if$
  219. }
  220.  
  221.  
  222. FUNCTION {not}
  223. {   { #0 }
  224.     { #1 }
  225.   if$
  226. }
  227.  
  228. FUNCTION {and}
  229. {   'skip$
  230.     { pop$ #0 }
  231.   if$
  232. }
  233.  
  234. FUNCTION {or}
  235. {   { pop$ #1 }
  236.     'skip$
  237.   if$
  238. }
  239.  
  240. FUNCTION {new.sentence.checka}
  241. { empty$
  242.     'skip$
  243.     'new.sentence
  244.   if$
  245. }
  246.  
  247. FUNCTION {field.or.null}
  248. { duplicate$ empty$
  249.     { pop$ "" }
  250.     'skip$
  251.   if$
  252. }
  253.  
  254. FUNCTION {emphasize}
  255. { duplicate$ empty$
  256.     { pop$ "" }
  257.     { "{\em " swap$ * "\/}" * }
  258.   if$
  259. }
  260.  
  261. INTEGERS { nameptr namesleft numnames }
  262.  
  263. STRINGS { fkt }
  264.  
  265. %% neu, setzt Autor/Hrsg. in Kapitaelchen 9/3/94
  266. FUNCTION { capitalize }
  267.  { duplicate$ empty$
  268.     { pop$ "" }
  269.     { "{\sc " swap$ * "}" * }
  270.   if$
  271. }
  272.  
  273. %%$$$ DIN-Quellenangabe : spezieller unselbst. Teil ist erschienen "In: " 
  274. %%                        dem bibliogr. selbst. Werk, z.B. Zeitschrift, Buch
  275.  
  276. %% 9/3/94
  277. FUNCTION {inquelle}
  278. { duplicate$ empty$
  279.     { pop$ "" }
  280.     { emphasize "{\bf In: }" swap$ * }
  281.   if$
  282. }
  283.  
  284. %% Vorschlag von H.Lueddecke, um Adelspraedikate beim Sortieren
  285. %% nach den(m) Vornamen aufzufuehren. Lo, 2/11/94
  286. FUNCTION {format.names}
  287. { 's :=
  288.   "" 'u  :=
  289.   #1 'nameptr :=
  290.   s num.names$ 'numnames :=
  291.   numnames 'namesleft :=
  292.     { namesleft #0 > }
  293.     {
  294. %vorher, Lue      s nameptr "{vv~}{ll}" format.name$ 't :=
  295.        s nameptr "{ll}" format.name$ 't :=
  296.        t capitalize 't :=
  297. %vorher,Lue      s nameptr "{, ff}" format.name$ 'u := 
  298.        s nameptr "{, ff}{ vv}" format.name$ 'u := 
  299.        u  text.length$  'lang :=     
  300.        #1 'zahl :=
  301.        "" 'v :=
  302.      {  zahl  lang  <  }
  303.      {  u  zahl  #1  substring$  "~"  =  
  304.            {  v  ""  =
  305.              {  u  #1  zahl  #1  -  substring$  'v :=  }
  306.              'skip$
  307.           if$
  308.           v  u  zahl  #2  substring$  *  "."  *  'v :=  }
  309.            'skip$
  310.         if$
  311.         zahl  #1  +  'zahl :=  }
  312.       while$
  313.       v  ""  =
  314.      {  u  'v :=  }
  315.      'skip$
  316.       if$
  317. %%    der string fkt enthaelt " (Hrsg.)", wenn Editorfeld nicht leer ist
  318.       t  v  *  fkt  *  't :=  %% Komma nach Nachnamen wird oben erledigt!
  319.                   %% t enthaelt nun d. formatierten Nnamen, Vnamen
  320.       nameptr #1 >
  321.      { namesleft #1 >
  322.          { " ; " * t * }
  323.          { numnames #2 >
  324.           { " " * }
  325.           'skip$
  326.            if$
  327.            t "{\sc others}" =
  328. %%                  { "et~al." * }     %% Geschmackssache
  329.             { " [~u.~a.~] " * }%%   13/2/94
  330.             { " ; " * t * }
  331.            if$
  332.            }
  333.         if$  %% Ende der namesleft-Pruefung
  334.       }
  335.         't    
  336.        %% hierdurch wird bei jed. Schleifendurchgang das sich komplet-
  337.        %% tierende Zwischen-Namensergebnis wieder auf den stack gelegt 
  338.  
  339.        if$  %%  Ende der nameptr-Pruefung
  340.  
  341.       nameptr #1 + 'nameptr :=
  342.       namesleft #1 -  'namesleft :=
  343.     }
  344.   while$  %%  Ende von { namesleft #0 > } ganz oben
  345.   "" 'fkt :=  %% fkt wird zurueckgesetzt
  346. }
  347.  
  348. %%$$$ geaendert 14/2/94
  349.  
  350. FUNCTION {format.authors}
  351. { author empty$
  352.     { "" }
  353.     { author format.names }
  354.   if$
  355. }
  356.  
  357. %%$$$ geaend. 20/2/94 Anpassung an DIN mit Autor + Hrsg. !!
  358.  
  359. FUNCTION {format.editors}
  360. { editor empty$
  361.    { author empty$
  362.        { "Weder Verfasser noch Hrsg. in " cite$ * warning$ }
  363.        'skip$ 
  364.      if$
  365.     }
  366.     { author empty$
  367.     { " (Hrsg.)" 'fkt :=  
  368.       editor format.names 
  369.     }
  370.     { " (Hrsg.)" 'fkt :=  
  371.       " ; " * editor format.names *
  372.     }
  373.       if$
  374.      }
  375.    if$
  376.  } 
  377.  
  378. %%$$$  Sonderfall: Herausgeber bei Typ incollection, 21/2/94
  379. FUNCTION {format.ed.incoll}
  380. { editor empty$
  381.      { "" }
  382.      { " (Hrsg.)" 'fkt :=  
  383.        editor format.names 
  384.      }
  385.   if$
  386.  
  387. %%$$$ neu 22/2/94  Neben den Herausgebern wird auch die veranstaltende
  388. %%       Koerperschaft, z.B. ein Institut, e. Gesellschaft, Organisat. genannt.
  389.  
  390. FUNCTION {format.proceed.organization}
  391. {  organization empty$
  392.       { "" }
  393.       { " / " organization * " (Veranst.)" * }
  394.    if$
  395. }
  396.  
  397. FUNCTION {format.title}
  398. { title empty$
  399.     { "" }
  400.     { title }  %% Text so wie er dasteht im Feld title
  401.   if$
  402. }
  403.  
  404. FUNCTION {n.dashify}
  405. { 't :=
  406.   ""
  407.     { t empty$ not }
  408.     { t #1 #1 substring$ "-" =
  409.     { t #1 #2 substring$ "--" = not
  410.         { "--" *
  411.           t #2 global.max$ substring$ 't :=
  412.         }
  413.         {   { t #1 #1 substring$ "-" = }
  414.         { "-" *
  415.           t #2 global.max$ substring$ 't :=
  416.         }
  417.           while$
  418.         }
  419.       if$
  420.     }
  421.     { t #1 #1 substring$ *
  422.       t #2 global.max$ substring$ 't :=
  423.     }
  424.       if$
  425.     }
  426.   while$
  427. }
  428.  
  429. %% geaendert 24/2/94
  430. FUNCTION {format.date}
  431. { year empty$
  432.     { month empty$
  433.     { "" }
  434.     { "there's a month but no year in " cite$ * warning$
  435.       month
  436.     }
  437.       if$
  438.     }
  439.     { month empty$  %% b. Buechern nur Jahr, ohne Monat ausgeb. im Impressum
  440.       'year
  441.       { month " " * year * }
  442.       if$
  443.     }
  444.   if$
  445. }
  446.  
  447. %%
  448. %%$$$  neue Fkt., 16/2/94 u. 14/3/94       das sog. Impressum
  449. FUNCTION {format.address.publisher.year}
  450. {  publisher empty$
  451.       { address empty$
  452.       { year empty$  
  453.           { "" }
  454.           { year } 
  455.         if$
  456.       }
  457.       { "Es gibt einen Verlagsort, aber keinen Verlag in " cite$ * warning$
  458.           address ", " * format.date * 
  459.       }
  460.     if$
  461.       }
  462.       { address empty$
  463.       { year empty$
  464.          { "Es gibt nur eine Verlagsangabe in " cite$ * warning$ 
  465.         publisher
  466.          }
  467.          { publisher ", " * format.date * }
  468.         if$
  469.       }
  470.       { year empty$
  471.           { address " : " * publisher * }
  472.           { address " : " * publisher * ", " * format.date * }
  473.         if$
  474.       }
  475.     if$
  476.       }
  477.   if$
  478. }
  479.  
  480. FUNCTION {format.btitle}
  481. { title emphasize
  482. }
  483.  
  484. FUNCTION {tie.or.space.connect}
  485. { duplicate$ text.length$ #3 <
  486.     { "~" }
  487.     { " " }
  488.   if$
  489.   swap$ * *
  490. }
  491.  
  492. FUNCTION {either.or.check}
  493. { empty$
  494.     'pop$
  495.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  496.   if$
  497. }
  498.  
  499. %% neu 8/3/94 in dieser Funkt. steckt im volume empty-Teil noch ein bug, der
  500. %%            aber ignoriert werden kann; das Ergebnis ist ok.
  501. FUNCTION {format.btitle.vol}
  502. { number empty$
  503.    { series empty$
  504.      { volume empty$
  505.     { title emphasize }
  506.     { title emphasize ". Bd." * volume tie.or.space.connect }
  507.        if$
  508.      }
  509.      { volume empty$
  510.     { title emphasize }
  511.     { series emphasize ". Bd." * volume tie.or.space.connect  " : " * title * } 
  512.        if$
  513.      }
  514.      if$%% series-test
  515.    }
  516.    { title emphasize }%% wenn number ex., dann immer title-Feld
  517.   if$%% Ende number-test
  518. }
  519.  
  520. %%$$$ neu 16/2/94
  521. %%   Serien- / Reihentitel werden im Feld series gespeichert. Weist die
  522. %%   Serie eine Zaehlung der Einzeltitel auf, gibt man entweder nach DIN alles 
  523. %%   in das Feld series so ein: ---> TITEL DER SERIE  NR. (der Vorlage) <---
  524. %%   z. B.  SERIES= { Mensch und Computer 12 }. 
  525. %%   [ Die Nummer der Vorlage darf auch durch " ; " abgesetzt werden. ]
  526. %%   oder:
  527. %%   man gibt die Zaehlung in das Feld NUMBER ein, z.B. NUMBER = {12}.
  528. %%   Achtung!!
  529. %%   Bei mehrbaendigen Werken steht d. Gesamttitel im Feld SERIES und die
  530. %%   Bandzaehlung im Feld VOLUME; NUMBER darf dann nicht besetzt sein!
  531. %%   Anderenfalls liegt ein Erfassungsfehler vor, da sich Reihe u. mehrbd.
  532. %%   Werk gegenseitig ausschliessen.
  533.  
  534. FUNCTION {format.series.number.din}
  535. { volume empty$
  536.     { number empty$
  537.       { series empty$
  538.            { "" }%%   Ausstieg mit Nullstring
  539.            { "(" series * ")" * } %% d. Seriennr koennte auch gleich hier
  540.                       %% im SERIES-Feld miterfasst werden
  541.         if$
  542.       }      
  543.       { series empty$
  544.            { "(" number tie.or.space.connect ")" * 
  545.          "there's a number but no series in " cite$ * warning$ 
  546.            }
  547.            { "(" series * number tie.or.space.connect ")" * }
  548.         if$
  549.       }
  550.        if$
  551.      }
  552.      { series empty$
  553.       { "" }
  554.       { type$ "proceedings" =  %%   Sonderfall !
  555.         { "(" series * ")" * }
  556.         { "" }%%   Ausstieg mit Nullstring, s. Kommentar
  557.         if$
  558.       }%% bei gezaehlten Reihen MUSS die Reihennr. im Feld NUMBER stehen!
  559.        if$ %% wenn also d. Feld VOLUME nicht leer ist, dann liegt falsche
  560.       }     %% Erfassung vor und es erfolgt d. Ausstieg mit d. Nullstring!
  561.   if$
  562. }
  563.  
  564.  
  565. %%$$$ 16/2/94
  566. %%  Auflagenvermerke gibt man komplett, einschliesslich Abkuerzungen in 
  567. %%  das Feld edition ein: ---> EDITION= { 3., erw. und verb. Aufl. }
  568. %%  oder fremdsprachlich:      EDITION= { 2nd edition }
  569.  
  570. FUNCTION {format.edition}
  571. { edition empty$
  572.     { "" }
  573.     { edition } 
  574.   if$
  575. }
  576.  
  577. %%$$$ neu, 18/3/94
  578. FUNCTION { format.isbn.issn }
  579. { isbn empty$
  580.      { issn empty$
  581.       { "" }
  582.       { "ISSN" issn n.dashify tie.or.space.connect }
  583.        if$
  584.      }
  585.      { "ISBN" isbn n.dashify tie.or.space.connect }
  586.   if$
  587. }
  588.  
  589. %%$$$ geaendert, 21/2/94  gibt Seitenzahl bei BOOK-Typ und verwandten T. aus
  590. FUNCTION {format.pages.book}
  591. { pages empty$
  592.     { "" }
  593. %    { pages n.dashify tie.or.space.connect " S" *}
  594.     { pages "Seiten" n.dashify  tie.or.space.connect }
  595.   if$
  596. }
  597.  
  598. %%$$$  alle anderen Seitenang. zB. Zeitschrft., INBOOK usw. a la Orig., 9/3/94
  599. FUNCTION {format.pages}
  600. { pages empty$
  601.     { "" }
  602.     { "S." pages n.dashify  tie.or.space.connect } 
  603.   if$
  604. }
  605.  
  606. %%$$$ Angaben v. Jahrgang, Jahr, Heftnr., Seiten bei Artikel-Typ
  607. %%    14/3/94
  608.  
  609. FUNCTION {format.vol.year.num.pages}
  610. { volume field.or.null
  611.     year empty$
  612.       { "Es gibt einen Jahrgang, aber kein Jahr in " cite$ * warning$ }
  613.       { " (" year * ")" * * }
  614.     if$
  615.     month empty$
  616.     'skip$
  617.     { ", " month * * }
  618.     if$
  619.     number empty$
  620.     'skip$
  621.     { ", Nr. " number * *
  622. %      volume empty$
  623. %       { "there's a number but no volume in " cite$ * warning$ }
  624. %       'skip$
  625. %      if$
  626.     }
  627.     if$
  628.   pages empty$
  629.     'skip$
  630.     { duplicate$ empty$
  631.     { pop$ format.pages }%% da pages leer, wird nur "" auf stack gelegt
  632.     { ", " format.pages * *}
  633.       if$
  634.     }
  635.   if$
  636. }
  637.  
  638. %% geaendert 21/2/94
  639. FUNCTION {format.chapter.pages}
  640. { chapter empty$
  641.     'format.pages
  642.     { type empty$
  643.     { "Kapitel " }
  644.     { type }
  645.       if$
  646.       chapter tie.or.space.connect
  647.       pages empty$
  648.     'skip$
  649.     { ", " * format.pages * }
  650.       if$
  651.     }
  652.   if$
  653. }
  654.  
  655. %%$$$  geaendert 21/2/94
  656. FUNCTION {format.in.ed.booktitle.din}
  657. { booktitle empty$
  658.     { "" }
  659.     { editor empty$
  660.     { volume empty$
  661.         { "{\bf In: }" booktitle emphasize * }
  662.         { "{\bf In: }" booktitle emphasize * 
  663.           " Bd." volume tie.or.space.connect * 
  664.         }
  665.       if$
  666.     }
  667.     { volume empty$
  668.         { "{\bf In: }" format.ed.incoll * ": " * booktitle emphasize * }
  669.         { "{\bf In: }" format.ed.incoll * ": " * booktitle emphasize * 
  670.           " Bd." volume tie.or.space.connect * 
  671.         }
  672.       if$
  673.     }
  674.       if$
  675.     }
  676.   if$
  677. }
  678.  
  679. %% geaendert 1/3/94
  680. FUNCTION {format.thesis.type}
  681. { type empty$
  682.     'skip$
  683.     { pop$
  684.       type 
  685.     }
  686.   if$
  687. }
  688.  
  689. %% geaendert 23/2/94    i.Orig. wird zuerst die number, dann der type getestet
  690. FUNCTION {format.tr.number.din}
  691. { type empty$
  692.      { number empty$
  693.      { " -- Forschungsbericht" }   %%  bei Minimalangaben besser ohne "."!
  694.      { "(" number tie.or.space.connect "). -- Forschungsbericht" * }
  695.        if$
  696.      }
  697.      { number empty$
  698.      { " -- " type * }             %%  bei Minimalangaben besser ohne "."!
  699.      { "(" number tie.or.space.connect "). -- " * type * }
  700.        if$
  701.      }
  702.   if$
  703. }
  704.  
  705.  
  706. FUNCTION {format.article.crossref}
  707. { key empty$
  708.     { journal empty$
  709.     { "need key or journal for " cite$ * " to crossref " * crossref *
  710.       warning$
  711.       ""
  712.     }
  713.     { "{\bf In: }{\em " journal * "\/}" * }
  714.       if$
  715.     }
  716.     { "{\bf In: }" key * }
  717.   if$
  718.   " (siehe \cite{" * crossref * "}" * ")" *
  719. }
  720.  
  721. %%geaendert 7/3/94 und noch einmal durch Lueddecke, s.o.
  722. FUNCTION {format.crossref.editor}
  723. %vorher,Lue  { editor #1 "{vv~}{ll}" format.name$ " (Hrsg.)" *
  724.  { editor #1 "{ll}" format.name$ " (Hrsg.)" *
  725.    editor num.names$ duplicate$
  726.    #2 >
  727.     { pop$ " et~al." * }
  728.     { #2 <
  729.     'skip$
  730.     { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  731.         { " et~al." * }
  732.         { " ; " * editor #2 "{vv~}{ll}" format.name$ * " (Hrsg.)" * }
  733.       if$
  734.     }
  735.       if$
  736.     }
  737.   if$
  738. }
  739.  
  740.  
  741. FUNCTION {format.book.crossref}
  742. { volume empty$
  743.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  744.       "(siehe "
  745.     }
  746.     { ". -- Bd." volume tie.or.space.connect
  747.       " von " *
  748.     }
  749.   if$
  750.   editor empty$
  751.   editor field.or.null author field.or.null =
  752.   or
  753.     { key empty$
  754.     { series empty$
  755.         { "need editor, key, or series for " cite$ * " to crossref " *
  756.           crossref * warning$
  757.           "" *
  758.         }
  759.         { "{\em " * series * "\/} (siehe " * }
  760.       if$
  761.     }
  762.     { key * }
  763.       if$
  764.     }
  765.     { format.crossref.editor * }
  766.   if$
  767.   " \cite{" * crossref * "}" * ")" *
  768. }
  769.  
  770. FUNCTION {format.incoll.inproc.crossref}
  771. { editor empty$
  772.   editor field.or.null author field.or.null =
  773.   or
  774.     { key empty$
  775.     { booktitle empty$
  776.         { "need editor, key, or booktitle for " cite$ * " to crossref " *
  777.           crossref * warning$
  778.           ""
  779.         }
  780.         { "{\bf In: }{\em " booktitle * "\/}" * }
  781.       if$
  782.     }
  783.     { "{\bf In: }" key * }
  784.       if$
  785.     }
  786.     { "{\bf In: }" format.crossref.editor * }
  787.   if$
  788.   " (siehe \cite{" * crossref * "}" * ")" *
  789. }
  790.  
  791. %%geaendert
  792. FUNCTION {article}
  793. { output.bibitem
  794.   format.authors "author" output.check
  795.   set.colon.after
  796.   format.title "title" output.check
  797.   crossref missing$
  798.     { journal inquelle output.nonnull 
  799.       new.sentence 
  800.       format.vol.year.num.pages output
  801.     }
  802.     { format.article.crossref output.nonnull }
  803.   if$
  804.   note set.period.dash.check
  805.   note output
  806.   issn set.period.dash.check
  807.   format.isbn.issn output
  808.   fin.entry
  809. }
  810.  
  811. %%$$$   geaendert, 20/2/94
  812. FUNCTION {book}
  813. { output.bibitem
  814.   author empty$
  815.     { format.editors "author and editor" output.check }
  816.     { format.authors  format.editors output.nonnull
  817.     }
  818.   if$
  819.   set.colon.after
  820.   crossref missing$
  821.     { format.btitle.vol "title" output.check }
  822.     { format.btitle "title" output.check }
  823.   if$
  824.   format.edition output  
  825.   format.address.publisher.year "publisher" output.check
  826.   new.sentence
  827.   crossref missing$
  828.     { format.series.number.din  output }
  829.     { format.book.crossref output.nonnull }
  830.   if$
  831.   new.sentence
  832.   format.pages.book output
  833.   note set.period.dash.check
  834.   note output 
  835.   isbn set.period.dash.check
  836.   format.isbn.issn output
  837.   fin.entry
  838. }
  839.  
  840. %% geaendert 23/2/94
  841. FUNCTION {inbook}
  842. { output.bibitem
  843. %% unselbst. Teile eines Buches werden am Anf. genannt, dann d selbst. Quelle 
  844.   chapter empty$
  845.     { "Keine Kapitelangaben in " cite$ * warning$ }
  846.     { type empty$
  847.      { "Kap. " }
  848.      { type }
  849.       if$
  850.      }
  851.   if$
  852.   chapter tie.or.space.connect " {\bf In: }" *
  853. %%   -------- jetzt kommt der bibliogr. selbst. Teil
  854.   author empty$
  855.     { format.editors "author and editor" output.check }
  856.     { format.authors output.nonnull
  857.     }
  858.   if$
  859.   set.colon.after
  860.   format.btitle.vol "title" output.check
  861.   crossref missing$
  862.     { format.edition output
  863.       format.address.publisher.year "publisher" output.check
  864.       new.sentence
  865.       format.series.number.din  output 
  866.       note set.period.dash.check
  867.       note output 
  868.       isbn set.period.dash.check
  869.       format.isbn.issn output
  870.     }
  871.     { format.book.crossref output.nonnull
  872.       note set.period.dash.check
  873.       note output 
  874.     }
  875.   if$
  876.   part.of.sentence
  877.   format.pages "pages" output.check
  878.   fin.entry
  879. }
  880.  
  881. %%  geaendert 21/2/94
  882. FUNCTION {incollection}
  883. { output.bibitem
  884.   format.authors "author" output.check
  885.   set.colon.after
  886.   format.title "title" output.check
  887.   crossref missing$
  888.     { format.in.ed.booktitle.din "booktitle" output.check
  889.       format.edition output
  890.       format.address.publisher.year "publisher" output.check
  891.       new.sentence
  892.       format.series.number.din  output %%$$$ 7/3/94
  893.     }
  894.     { format.incoll.inproc.crossref output.nonnull }
  895.   if$
  896.   note set.period.dash.check
  897.   note output 
  898.   isbn set.period.dash.check
  899.   issn set.period.dash.check
  900.   format.isbn.issn output
  901.   part.of.sentence
  902.   format.chapter.pages output
  903.   fin.entry
  904. }
  905.  
  906. %%  geaendert 22/2/94
  907. FUNCTION {inproceedings}
  908. { output.bibitem
  909.   format.authors "author" output.check
  910.   set.colon.after
  911.   format.title "title" output.check
  912.   crossref missing$
  913.     { format.in.ed.booktitle.din "booktitle" output.check
  914.       volume empty$
  915.      'skip$
  916.      { " Bd." volume tie.or.space.connect output }
  917.       if$
  918.       address empty$
  919.     { organization new.sentence.checka
  920.       organization output
  921.       part.of.sentence
  922.       format.address.publisher.year output
  923.     }
  924.     { format.address.publisher.year "publisher" output.check }
  925.       if$
  926.     }
  927.     { format.incoll.inproc.crossref output.nonnull }
  928.   if$
  929.   note set.period.dash.check
  930.   note output 
  931.   isbn set.period.dash.check
  932.   format.isbn.issn output
  933.   part.of.sentence
  934.   format.pages output
  935.   fin.entry
  936. }
  937.  
  938. %% FUNCTION {conference} { inproceedings }
  939.  
  940. %% geaendert, 21/2/94
  941. FUNCTION {manual}
  942. { output.bibitem
  943.   author empty$
  944.     { organization empty$
  945.     'skip$
  946.     { organization output.nonnull
  947.       address output
  948.     }
  949.       if$
  950.     }
  951.     { format.authors output.nonnull }
  952.   if$
  953.   set.colon.after
  954.   format.btitle "title" output.check
  955.   format.edition output
  956.   author empty$
  957.     { organization empty$
  958.     { address output
  959.       part.of.sentence
  960.     }
  961.     'skip$
  962.       if$
  963.     }
  964.     { address ": " *  organization * output
  965.       part.of.sentence
  966.     }
  967.   if$
  968.   format.date output
  969.   pages new.sentence.checka
  970.   format.pages.book output
  971.   note set.period.dash.check
  972.   note output
  973.   fin.entry
  974. }
  975.  
  976.  
  977. %%$$$%%   geaendert KFL, 17/2/94 Standard = "Diplomarbeit", sonst TYPE="anderer Typ"
  978. FUNCTION {mastersthesis}
  979. { output.bibitem
  980.   format.authors "author" output.check
  981.   set.colon.after
  982.   format.btitle "title" output.check
  983.   address output
  984.   part.of.sentence 
  985.   school "school" output.check
  986.   part.of.sentence
  987.   "Diplomarbeit" format.thesis.type output.nonnull
  988.   part.of.sentence
  989.   format.date "year" output.check
  990.   pages new.sentence.checka
  991.   format.pages output
  992.   note set.period.dash.check
  993.   note output
  994.   fin.entry
  995. }
  996.  
  997. %% 26/2/94 hiermit werden u.a. Normen erfasst
  998. FUNCTION {misc}
  999. { output.bibitem
  1000.   note empty$
  1001.      { title empty$ 
  1002.       { "" }
  1003.       { format.authors output
  1004.         format.title output
  1005.         howpublished output
  1006.         format.date output 
  1007.       } 
  1008.     if$
  1009.       }
  1010.       { note duplicate$ #1 #4 substring$ "Norm" =
  1011.        { output new.sentence 
  1012.          format.date output 
  1013.          format.title output
  1014.        }
  1015.        { pop$ ""
  1016.          author empty$
  1017.            { format.editors output }
  1018.            { format.authors  format.editors output.nonnull }
  1019.          if$
  1020.          set.colon.after
  1021.          format.title output
  1022.          howpublished output
  1023.          format.date output 
  1024.          note set.period.dash.check
  1025.          note output
  1026.        }
  1027.      if$
  1028.        }
  1029.    if$
  1030.   fin.entry
  1031. }
  1032.  
  1033. %% geaendert 21/2/94
  1034. FUNCTION {proceedings}
  1035. { output.bibitem
  1036.   editor empty$
  1037.     { organization empty$
  1038.      { "" } 
  1039.      { organization " (Veranst.)" * output }
  1040.       if$
  1041.     }
  1042.     { format.editors output.nonnull }
  1043.   if$
  1044.   set.colon.after
  1045.   format.btitle "title" output.check
  1046.   new.sentence
  1047.   editor empty$
  1048.     'skip$  
  1049.     {  format.proceed.organization output }
  1050.   if$
  1051.   new.sentence
  1052.   format.series.number.din emphasize output.nonnull
  1053.   volume empty$
  1054.     { "" output.nonnull } 
  1055.     { "Bd." volume tie.or.space.connect "volume" output.check }
  1056.   if$
  1057.   format.address.publisher.year "publisher" output.check
  1058.   pages  empty$
  1059.       'skip$            %%   evtl. hier new.sentence !!
  1060.       'part.of.sentence
  1061.    if$
  1062.   format.pages.book output
  1063.   note set.period.dash.check
  1064.   note output 
  1065.   isbn set.period.dash.check
  1066.   issn set.period.dash.check
  1067.   format.isbn.issn output
  1068.   fin.entry
  1069. }
  1070.  
  1071. %% geaendert 23/2/947 auch fuer Firmenschriften u."a.
  1072. FUNCTION {techreport}
  1073. { output.bibitem
  1074.   author empty$
  1075.     { format.editors "author and editor" output.check }
  1076.     { format.authors  format.editors output.nonnull }
  1077.   if$
  1078.   set.colon.after
  1079.   format.title "title" output.check
  1080.   institution new.sentence.checka
  1081.   institution empty$
  1082.      'skip$
  1083.      { " / " institution *  output.nonnull }
  1084.   if$
  1085.   format.address.publisher.year output
  1086.   number new.sentence.checka
  1087.   format.tr.number.din "number" output.check
  1088.   new.sentence
  1089.   format.pages.book output
  1090.   note "note" output.check
  1091.   isbn set.period.dash.check
  1092.   issn set.period.dash.check
  1093.   format.isbn.issn output
  1094.   fin.entry
  1095. }
  1096.  
  1097. FUNCTION {default.type} { misc }
  1098.  
  1099. MACRO {jan} {"Januar"}
  1100.  
  1101. MACRO {feb} {"Februar"}
  1102.  
  1103. MACRO {mar} {"Maerz"}
  1104.  
  1105. MACRO {apr} {"April"}
  1106.  
  1107. MACRO {mai} {"Mai"}
  1108.  
  1109. MACRO {jun} {"Juni"}
  1110.  
  1111. MACRO {jul} {"Juli"}
  1112.  
  1113. MACRO {aug} {"August"}
  1114.  
  1115. MACRO {sep} {"September"}
  1116.  
  1117. MACRO {okt} {"Oktober"}
  1118.  
  1119. MACRO {nov} {"November"}
  1120.  
  1121. MACRO {dez} {"Dezember"}
  1122.  
  1123. %%$$$  stillgelegte Beispiele fuer den Gebrauch von Kuerzeln (hier Zs-Titel).
  1124.  
  1125. %%MACRO {acmcs} {"ACM Computing Surveys"}
  1126.  
  1127. %%MACRO {acta} {"Acta Informatica"}
  1128.  
  1129. %%MACRO {cacm} {"Communications of the ACM"}
  1130.  
  1131. %%MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  1132.  
  1133. %%MACRO {ibmsj} {"IBM Systems Journal"}
  1134.  
  1135. %%MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  1136.  
  1137. %%MACRO {ieeetc} {"IEEE Transactions on Computers"}
  1138.  
  1139. %%MACRO {ieeetcad}
  1140. %% {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  1141.  
  1142. %%MACRO {ipl} {"Information Processing Letters"}
  1143.  
  1144. %%MACRO {jacm} {"Journal of the ACM"}
  1145.  
  1146. READ
  1147.  
  1148. FUNCTION {sortify}
  1149. { purify$
  1150.   "l" change.case$
  1151. }
  1152.  
  1153. INTEGERS { len }
  1154.  
  1155. FUNCTION {chop.word}
  1156. { 's :=
  1157.   'len :=
  1158.   s #1 len substring$ =
  1159.     { s len #1 + global.max$ substring$ }
  1160.     's
  1161.   if$
  1162. }
  1163.  
  1164. %%INTEGERS { et.al.char.used }
  1165.  
  1166. %%FUNCTION {initialize.et.al.char.used}
  1167. %%{ #0 'et.al.char.used :=
  1168. %%}
  1169.  
  1170. %%EXECUTE {initialize.et.al.char.used}
  1171.  
  1172. FUNCTION {format.lab.names}
  1173. { 's :=
  1174.   s num.names$ 'numnames :=
  1175.   numnames #1 >
  1176.     { numnames #4 >
  1177.     { #3 'namesleft := }
  1178.     { numnames 'namesleft := }
  1179.       if$
  1180.       #1 'nameptr :=
  1181.       ""
  1182.     { namesleft #0 > }
  1183.     { nameptr numnames =
  1184.         { s nameptr "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  1185.         { "\," *
  1186. %%              { "{\etalchar{+}}" *
  1187. %%                #1 'et.al.char.used :=
  1188.         }
  1189. %%              { s nameptr "{v{}}{l{}}" format.name$ * }
  1190.         { s nameptr "{l{}}" format.name$ * }
  1191.           if$
  1192.         }
  1193. %%          { s nameptr "{v{}}{l{}}" format.name$ * }
  1194.         { s nameptr "{l{}}" format.name$ * }
  1195.       if$
  1196.       nameptr #1 + 'nameptr :=
  1197.       namesleft #1 - 'namesleft :=
  1198.     }
  1199.       while$
  1200.       numnames #4 >
  1201.     { "\," *
  1202. %%      { "{\etalchar{+}}" *
  1203. %%        #1 'et.al.char.used :=
  1204.     }
  1205.     'skip$
  1206.       if$
  1207.     }
  1208. %%  { s #1 "{v{}}{l{}}" format.name$
  1209.     { s #1 "{l{}}" format.name$
  1210.       duplicate$ text.length$ #2 <
  1211.     { pop$ s #1 "{ll}" format.name$ #3 text.prefix$ }
  1212.     'skip$
  1213.       if$
  1214.     }
  1215.   if$
  1216. }
  1217.  
  1218. FUNCTION {author.key.label}
  1219. { author empty$
  1220.     { key empty$
  1221.     { cite$ #1 #3 substring$ }
  1222.     { key #3 text.prefix$ }
  1223.       if$
  1224.     }
  1225.     { author format.lab.names }
  1226.   if$
  1227. }
  1228.  
  1229. FUNCTION {author.editor.key.label}
  1230. { author empty$
  1231.     { editor empty$
  1232.     { key empty$
  1233.         { cite$ #1 #3 substring$ }
  1234.         { key #3 text.prefix$ }
  1235.       if$
  1236.     }
  1237.     { editor format.lab.names }
  1238.       if$
  1239.     }
  1240.     { author format.lab.names }
  1241.   if$
  1242. }
  1243.  
  1244. FUNCTION {author.key.organization.label}
  1245. { author empty$
  1246.     { key empty$
  1247.     { organization empty$
  1248.         { cite$ #1 #3 substring$ }
  1249.         { "The " #4 organization chop.word #3 text.prefix$ }
  1250.       if$
  1251.     }
  1252.     { key #3 text.prefix$ }
  1253.       if$
  1254.     }
  1255.     { author format.lab.names }
  1256.   if$
  1257. }
  1258.  
  1259. FUNCTION {editor.key.organization.label}
  1260. { editor empty$
  1261.     { key empty$
  1262.     { organization empty$
  1263.         { cite$ #1 #3 substring$ }
  1264.         { "The " #4 organization chop.word #3 text.prefix$ }
  1265.       if$
  1266.     }
  1267.     { key #3 text.prefix$ }
  1268.       if$
  1269.     }
  1270.     { editor format.lab.names }
  1271.   if$
  1272. }
  1273.  
  1274. FUNCTION {calc.label}
  1275. { type$ "book" =
  1276.   type$ "inbook" =
  1277.   or
  1278.     'author.editor.key.label
  1279.     { type$ "proceedings" =
  1280.     'editor.key.organization.label
  1281.     { type$ "manual" =
  1282.         'author.key.organization.label
  1283.         'author.key.label
  1284.       if$
  1285.     }
  1286.       if$
  1287.     }
  1288.   if$
  1289.   duplicate$
  1290.   year field.or.null purify$ #-1 #2 substring$
  1291.   *
  1292.   'label :=
  1293.   year field.or.null purify$ #-1 #4 substring$
  1294.   *
  1295.   sortify 'sort.label :=
  1296. }
  1297.  
  1298. FUNCTION {sort.format.names}
  1299. { 's :=
  1300.   #1 'nameptr :=
  1301.   ""
  1302.   s num.names$ 'numnames :=
  1303.   numnames 'namesleft :=
  1304.     { namesleft #0 > }
  1305.     { nameptr #1 >
  1306.     { "   " * }
  1307.     'skip$
  1308.       if$
  1309. %     s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
  1310. %
  1311. %     Zeile geaendert, damit die Namenszusaetze wie von, de usw nach deutscher
  1312. %     Norm richtig einsortiert werden.   27.10.94 Lueddecke
  1313. %
  1314.       s nameptr "{ll{ }}{  ff{ }}{ vv{ }}{  jj{ }}" format.name$ 't :=
  1315.       nameptr numnames = t "others" = and
  1316.     { "et al" * }
  1317.     { t sortify * }
  1318.       if$
  1319.       nameptr #1 + 'nameptr :=
  1320.       namesleft #1 - 'namesleft :=
  1321.     }
  1322.   while$
  1323. }
  1324.  
  1325. FUNCTION {sort.format.title}
  1326. { 't :=
  1327.   "A " #2
  1328.     "An " #3
  1329.       "Der " #4
  1330.     "Die " #4
  1331.       "Das " #4
  1332.         "Ein " #4
  1333.           "Eine " #5 
  1334.           "The " #4 t chop.word
  1335.            chop.word
  1336.          chop.word
  1337.        chop.word
  1338.      chop.word
  1339.        chop.word
  1340.     chop.word
  1341.   chop.word
  1342.   sortify
  1343.   #1 global.max$ substring$
  1344. }
  1345.  
  1346. FUNCTION {author.sort}
  1347. { author empty$
  1348.     { key empty$
  1349.     { "to sort, need author or key in " cite$ * warning$
  1350.       ""
  1351.     }
  1352.     { key sortify }
  1353.       if$
  1354.     }
  1355.     { author sort.format.names }
  1356.   if$
  1357. }
  1358.  
  1359. FUNCTION {author.editor.sort}
  1360. { author empty$
  1361.     { editor empty$
  1362.     { key empty$
  1363.         { "to sort, need author, editor, or key in " cite$ * warning$
  1364.           ""
  1365.         }
  1366.         { key sortify }
  1367.       if$
  1368.     }
  1369.     { editor sort.format.names }
  1370.       if$
  1371.     }
  1372.     { author sort.format.names }
  1373.   if$
  1374. }
  1375.  
  1376. FUNCTION {author.organization.sort}
  1377. { author empty$
  1378.     { organization empty$
  1379.     { key empty$
  1380.         { "to sort, need author, organization, or key in " cite$ * warning$
  1381.           ""
  1382.         }
  1383.         { key sortify }
  1384.       if$
  1385.     }
  1386.     { "The " #4 organization chop.word sortify }
  1387.       if$
  1388.     }
  1389.     { author sort.format.names }
  1390.   if$
  1391. }
  1392.  
  1393. FUNCTION {editor.organization.sort}
  1394. { editor empty$
  1395.     { organization empty$
  1396.     { key empty$
  1397.         { "to sort, need editor, organization, or key in " cite$ * warning$
  1398.           ""
  1399.         }
  1400.         { key sortify }
  1401.       if$
  1402.     }
  1403.     { "The " #4 organization chop.word sortify }
  1404.       if$
  1405.     }
  1406.     { editor sort.format.names }
  1407.   if$
  1408. }
  1409.  
  1410. FUNCTION {presort}
  1411. { calc.label
  1412.   sort.label
  1413.   "    "
  1414.   *
  1415.   type$ "book" =
  1416.   type$ "inbook" =
  1417.   or
  1418.     'author.editor.sort
  1419.     { type$ "proceedings" =
  1420.     'editor.organization.sort
  1421.     { type$ "manual" =
  1422.         'author.organization.sort
  1423.         'author.sort
  1424.       if$
  1425.     }
  1426.       if$
  1427.     }
  1428.   if$
  1429.   *
  1430.   "    "
  1431.   *
  1432.   year field.or.null sortify
  1433.   *
  1434.   "    "
  1435.   *
  1436.   title field.or.null
  1437.   sort.format.title
  1438.   *
  1439.   #1 entry.max$ substring$
  1440.   'sort.key$ :=
  1441. }
  1442.  
  1443. ITERATE {presort}
  1444.  
  1445. SORT
  1446.  
  1447. STRINGS { longest.label last.sort.label next.extra }
  1448.  
  1449. INTEGERS { longest.label.width last.extra.num }
  1450.  
  1451. FUNCTION {initialize.longest.label}
  1452. { "" 'longest.label :=
  1453.   #0 int.to.chr$ 'last.sort.label :=
  1454.   "" 'next.extra :=
  1455.   #0 'longest.label.width :=
  1456.   #0 'last.extra.num :=
  1457. }
  1458.  
  1459. FUNCTION {forward.pass}
  1460. { last.sort.label sort.label =
  1461.     { last.extra.num #1 + 'last.extra.num :=
  1462.       last.extra.num int.to.chr$ 'extra.label :=
  1463.     }
  1464.     { "a" chr.to.int$ 'last.extra.num :=
  1465.       "" 'extra.label :=
  1466.       sort.label 'last.sort.label :=
  1467.     }
  1468.   if$
  1469. }
  1470.  
  1471. FUNCTION {reverse.pass}
  1472. { next.extra "b" =
  1473.     { "a" 'extra.label := }
  1474.     'skip$
  1475.   if$
  1476.   label extra.label * 'label :=
  1477.   label width$ longest.label.width >
  1478.     { label 'longest.label :=
  1479.       label width$ 'longest.label.width :=
  1480.     }
  1481.     'skip$
  1482.   if$
  1483.   extra.label 'next.extra :=
  1484. }
  1485.  
  1486. EXECUTE {initialize.longest.label}
  1487.  
  1488. ITERATE {forward.pass}
  1489.  
  1490. REVERSE {reverse.pass}
  1491.  
  1492. FUNCTION {begin.bib}
  1493. %%et.al.char.used
  1494. %%    { "\newcommand{\etalchar}[1]{$^{#1}$}" write$ newline$ }
  1495. %%    'skip$
  1496. %%  if$
  1497.   preamble$ empty$
  1498.     'skip$
  1499.     { preamble$ write$ newline$ }
  1500.   if$
  1501.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1502. }
  1503.  
  1504. EXECUTE {begin.bib}
  1505.  
  1506. EXECUTE {init.state.consts}
  1507.  
  1508. ITERATE {call.type$}
  1509.  
  1510. FUNCTION {end.bib}
  1511. { newline$
  1512.   "\end{thebibliography}" write$ newline$
  1513. }
  1514.  
  1515. EXECUTE {end.bib}
  1516.  
  1517. %% Ende von DINALPHA.BST  KFL, 28/3/94
  1518.